package com.zcy.day1.test;

public class Student {
    private String name;
    private String studentNumber;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStudentNumber() {
        return studentNumber;
    }

    public Student() {
    }

    public Student(String name, String studentNumber) {
        this.name = name;
        this.studentNumber = studentNumber;
    }

    public void setStudentNumber(String studentNumber) {
        this.studentNumber = studentNumber;
    }

    @Override
    public String toString() {
        return "学生" + this.getName() + "学号" + this.getStudentNumber();
    }

    @Override
    public boolean equals(Object o) {
        if (o instanceof Student) {
            Student student = (Student) o;
            return this.name.equals(student.getName()) && this.studentNumber.equals(student.getStudentNumber());
        }
        return false;

    }


}
